package com.smxy.daydayup.mapper;

import com.smxy.daydayup.pojo.Course;
import com.smxy.daydayup.pojo.dto.CourseInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
  * @team daydayup
  * @time 2021-12-06 21:45
  */
@Mapper
public interface CourseMapper {
    int deleteByPrimaryKey(Integer courseId);

    int insert(Course record);

    int insertSelective(Course record);

    Course selectByPrimaryKey(Integer courseId);

    int updateByPrimaryKeySelective(Course record);

    int updateByPrimaryKey(Course record);

    List<CourseInfo> selectCourse(@Param("userId") String userId);

    List<Course> selectprofessorCourse(@Param("userId") String userId);

    Integer selectCourseIdByCode(@Param("courseCode") String courseCode);

    List<CourseInfo> selectAll();

    String selectCode(String code);
}